import { axios } from '@/utils/request'

const api = {
  categoryEdit: '/video-goods/cat-edit',
  categoryList: '/video-goods/cat-list',
  categoryStatusEdit: '/video-goods/cat-status',
  categoryRemove: '/video-goods/cat-del',
  videoGoodsList: '/video-goods/list',
  videoGoodsAudit: '/video-goods/audit',
  videoGoodsHandleVideo: '/video-goods/handle-video',
  videoGoodsReportList: '/video-goods/report-list',
  videoGoodsHandleReport: '/video-goods/handle-report',
  videoGoodsAuthorList: '/video-goods/author-list',
  videoGoodsAuditAuthor: '/video-goods/audit-author',
  videoGoodsHandleAuthor: '/video-goods/handle-author',
  videoGoodsSetSetting: '/video-goods/set-setting',
  videoGoodsSetting: '/video-goods/setting',
  videoGoodsGoodsList: '/video-goods/goods-list',
  videoGoodsAddGoods: '/video-goods/add-goods',
  videoGoodsStoreGoodsList: '/video-goods/store-goods-list',
  videoGoodsGoodsStatus: '/video-goods/goods-status',
  videoGoodsGoodsDel: '/video-goods/goods-del',
  videoGoodsShareList: '/video-goods/video-goods-share-list'
}

import storage from 'store'

export default api

/**
 * @des 分类添加编辑
 */
export function categoryEdit(data) {
  let store_id = storage.get('storeId')

  return axios({
    url: `${api.categoryEdit}&store_id=${store_id}`,
    method: 'post',
    data
  })
}
/**
 * @des 分类列表
 */
export function categoryList(params) {
  let store_id = storage.get('storeId')

  return axios({
    url: `${api.categoryList}&store_id=${store_id}`,
    method: 'get',
    params
  })
}
/**
 * @des 分类状态修改
 */
export function categoryStatusEdit(data) {
  let store_id = storage.get('storeId')

  return axios({
    url: `${api.categoryStatusEdit}&store_id=${store_id}`,
    method: 'post',
    data
  })
}

/**
 * @des 作品列表
 */
export function videoGoodsList(params) {
  let store_id = storage.get('storeId')

  return axios({
    url: `${api.videoGoodsList}&store_id=${store_id}`,
    method: 'get',
    params
  })
}
/**
 * @des 作品审核
 */
export function videoGoodsAudit(data) {
  let store_id = storage.get('storeId')

  return axios({
    url: `${api.videoGoodsAudit}&store_id=${store_id}`,
    method: 'post',
    data
  })
}
/**
 * @des 作品状态更改
 */
export function videoGoodsHandleVideo(data) {
  let store_id = storage.get('storeId')

  return axios({
    url: `${api.videoGoodsHandleVideo}&store_id=${store_id}`,
    method: 'post',
    data
  })
}
/**
 * @des 获取举报列表
 */
export function videoGoodsReportList(params) {
  let store_id = storage.get('storeId')

  return axios({
    url: `${api.videoGoodsReportList}&store_id=${store_id}`,
    method: 'get',
    params
  })
}
/**
 * @des 举报处理
 */
export function videoGoodsHandleReport(data) {
  let store_id = storage.get('storeId')

  return axios({
    url: `${api.videoGoodsHandleReport}&store_id=${store_id}`,
    method: 'post',
    data
  })
}
/**
 * @des 作者列表
 */
export function videoGoodsAuthorList(params) {
  let store_id = storage.get('storeId')

  return axios({
    url: `${api.videoGoodsAuthorList}&store_id=${store_id}`,
    method: 'get',
    params
  })
}
/**
 * @des 作者审核
 */
export function videoGoodsAuditAuthor(data) {
  let store_id = storage.get('storeId')

  return axios({
    url: `${api.videoGoodsAuditAuthor}&store_id=${store_id}`,
    method: 'post',
    data
  })
}
/**
 * @des 作者状态更改
 */
export function videoGoodsHandleAuthor(data) {
  let store_id = storage.get('storeId')

  return axios({
    url: `${api.videoGoodsHandleAuthor}&store_id=${store_id}`,
    method: 'post',
    data
  })
}
/**
 * @des 设置接口
 */
export function videoGoodsSetSetting(data) {
  let store_id = storage.get('storeId')

  return axios({
    url: `${api.videoGoodsSetSetting}&store_id=${store_id}`,
    method: 'post',
    data
  })
}
/**
 * @des 获取设置信息接口
 */
export function videoGoodsSetting(params) {
  let store_id = storage.get('storeId')

  return axios({
    url: `${api.videoGoodsSetting}&store_id=${store_id}`,
    method: 'get',
    params
  })
}
/**
 * @des 短视频商品列表
 */
export function videoGoodsGoodsList(params) {
  let store_id = storage.get('storeId')

  return axios({
    url: `${api.videoGoodsGoodsList}&store_id=${store_id}`,
    method: 'get',
    params
  })
}
/**
 * @des 获取可选择商城商品列表
 */
export function videoGoodsStoreGoodsList(params) {
  let store_id = storage.get('storeId')

  return axios({
    url: `${api.videoGoodsStoreGoodsList}&store_id=${store_id}`,
    method: 'get',
    params
  })
}
/**
 * @des 添加短视频商品接口
 */
export function videoGoodsAddGoods(data) {
  let store_id = storage.get('storeId')

  return axios({
    url: `${api.videoGoodsAddGoods}&store_id=${store_id}`,
    method: 'post',
    data
  })
}
/**
 * @des 短视频商品状态修改
 */
export function videoGoodsGoodsStatus(data) {
  let store_id = storage.get('storeId')

  return axios({
    url: `${api.videoGoodsGoodsStatus}&store_id=${store_id}`,
    method: 'post',
    data
  })
}
/**
 * @des 短视频商品删除
 */
export function videoGoodsGoodsDel(data) {
  let store_id = storage.get('storeId')

  return axios({
    url: `${api.videoGoodsGoodsDel}&store_id=${store_id}`,
    method: 'post',
    data
  })
}

/**
 * @des 短视频分佣记录
 */
export function videoGoodsShareList(data) {
  let store_id = storage.get('storeId')
  return axios({
    url: `${api.videoGoodsShareList}&store_id=${store_id}`,
    method: 'post',
    data
  })
}
